package com.taiyi.renaissancemall.Utils;

import android.content.Context;
import android.os.Build;
import android.os.LocaleList;

import java.util.Locale;

/**
 * author: pearce on 2019-12-25
 * version: v1.0.0
 */
public class LocaleUtil {

    /**
     * 获取系统Locale
     * @param context
     * @return
     */
    public static Locale getSystemLocale(Context context) {
        Locale locale;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            locale = LocaleList.getDefault().get(0);
        } else {
            locale = Locale.getDefault();
        }

        return locale;
    }

    /**
     *
     * @param context
     */
    public static void saveSystemLanguage(Context context) {
//        Utils.getSpUtils()
    }


//    public static void
}
